package com.wfx.controller;


import com.wfx.entity.*;
import com.wfx.service.IUserInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author zhu
 * @since 2021-01-20
 */
@RestController
@RequestMapping("/user")
@Api(description = "用户管理")
@CrossOrigin
public class UserInfoController {
    @Autowired
    private IUserInfoService iUserService;

    @PostMapping("/search")
    @ApiOperation("用户查询")
    public PageResult<UserInfo> search(@RequestBody @ApiParam("用户分页+条件")PageDTO<UserInfo> pageDTO){
        return iUserService.search(pageDTO);
    }
    @PostMapping("/update")
    @ApiOperation("用户修改")
    public Result<UserInfo> update(@RequestBody @ApiParam("用户实体")UserInfo userInfo){
        return iUserService.update(userInfo);
    }
}
